<script setup lang="ts">
import { onMounted } from 'vue'
import { useAppStore } from './store/app'
import DefaultLayout from './layouts/DefaultLayout.vue'

const appStore = useAppStore()

// 初始化主题
onMounted(() => {
  appStore.initTheme()
  appStore.getConfig()
})
</script>

<template>
  <div id="app" class="app">
    <DefaultLayout>
      <router-view v-slot="{ Component }">
        <transition name="page">
          <component :is="Component" />
        </transition>
      </router-view>
    </DefaultLayout>
  </div>
</template>

<style>
/* 全局样式已在style.css中定义 */
</style>
